package com.best.oasis.settlement.service.employee;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.best.oasis.settlement.common.entity.employee.Employee;
import com.best.oasis.settlement.common.so.employee.EmployeeSO;
import com.best.oasis.settlement.common.vo.employee.EmployeeVO;
import com.best.oasis.settlement.dao.employee.EmployeeDao;
import com.best.oasis.settlement.service.base.BaseServiceImpl;
import com.best.oasis.settlement.util.page.PageList;

@Service
public class EmployeeServiceImpl extends BaseServiceImpl<Employee, EmployeeVO, Long> implements EmployeeService {
	@Autowired
    private EmployeeDao employeeDao;
    
    @Override
    public void afterConstruct() {
        super.setBaseDao(employeeDao);
        super.setEntityClass(Employee.class);
        super.setEntityVOClass(EmployeeVO.class);

    }

	@SuppressWarnings("unchecked")
	@Override
	public PageList<EmployeeVO> getPageList(EmployeeSO so) {
		PageList<EmployeeVO> result = new PageList<EmployeeVO>();
        result = orikaBeanMapper.convertPageList(employeeDao.getPageList(so), entityVOClass);
        return result;
	}

}
